package com.et.core.goods

data class GoodsInfo(
    var barcode: String,
    var name: String,
    var image: String,
    var discount: Int,
    var channel: Channel
) {

    companion object {
        data class Channel(
            var box: Int,
            var channel: Int,
            var price: Int,
            var label: String,
        )

        fun create(info: ChannelEntity): GoodsInfo =
            GoodsInfo(
                info.barcode,
                info.name,
                info.image,
                info.discount,
                Channel(info.box, info.channel, info.priceCent, info.label)
            )
    }
}
